<template>
	<view class="content"
		:style="'background: url('+ c_imgPath + 'mine/indexBg.png'+ ') repeat-y 0 0 / 100% auto;'">

		<!-- 内容 -->
		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
			<view class="xuyuan" v-for="(v,i) in listData" :key='i'>
				<view class="xuyuan_head">
					<view style="opacity: .4;">打包时间：{{v.addtime}}</view>
					<view style="font-size: 24rpx;">共 <text style="color:#B07CDD;margin: 0 4rpx;">{{v.count}}</text> 件
					</view>
				</view>
				<view class="xuyuan_con">
					<view class="xuyuan_item" v-for="(a,b) in v.order_list" :key="b">
						<view class="list_img">
							<image :src="a.goodslist_imgurl"></image>
							<view class="shang_title">{{a.shang_title}}</view>
							<view class="allNum">X{{a.prize_num}}</view>
						</view>
						<view class="xuyuan_item_2 flex_center">
							<view class="hang1">{{a.goodslist_title}}</view>
						</view>
					</view>
				</view>
				<view class="xuyuan_foot">
					<view>打包价：<text style="font-size: 32rpx;color:#B07CDD;">¥{{v.money}}</text></view>
				</view>
			</view>

		</mescroll-body>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				c_imgPath:'https://qt.yhemall.com/',
				downOption: {
					auto: false
				},
				listData: []

			}
		},
		onLoad(e) {

		},
		methods: {

			/*下拉刷新的回调 */
			downCallback() {
				this.mescroll.resetUpScroll()
			},
			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
			upCallback(page) {
				//联网加载数据
				this.loadData(page.num);
			},
			loadData(pageNo) {
				// 模拟接口
				let that = this;
				that.req({
					url: 'warehouse_recovery_record',
					Loading: true,
					data: {
						page: pageNo,
					},
					success(res) {
						that.mescroll.endByPage(res.data.data.length, res.data.last_page);
						if (pageNo == 1) {
							that.listData = res.data.data;
						} else {
							that.listData = that.listData.concat(res.data.data);
						}

					}
				})
			},


		}
	}
</script>

<style>
	.xuyuan_foot {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		padding: 30rpx;
		font-size: 24rpx;
		/* 	font-family: 'zcq'; */
		color: #FFFFFF;
		/* text-shadow: 0px 0px 10rpx rgba(237, 87, 255, 0.7); */
	}

	.xuyuan_item_2 {
		color: #FFFFFF;
		font-size: 24rpx;
		width: 100%;
		padding-left: 4rpx;
		margin-top: 10rpx;
	}

	.allNum {
		position: absolute;
		bottom: 0rpx;
		right: 0rpx;
		font-size: 22rpx;
		background-color: rgba(0, 0, 0, 0.6);
		border-radius: 8rpx 0 0 8rpx;
		color: #fff;
		padding: 5rpx 10rpx;
	}

	.list_img .shang_title {
		position: absolute;
		bottom: 0;
		background: #B07CDD;
		left: 0;
		/* width: 100%; */
		color: #fff;
		font-size: 24rpx;
		/* font-family: 'zcq'; */
		text-align: left;
		padding: 4rpx 10rpx;
		box-sizing: border-box;
		border-top-right-radius: 15rpx;
	}

	.list_img>image {
		width: 168rpx;
		height: 168rpx;
		border-radius: 10rpx 10rpx 0 0;
		margin: 1rpx auto;

	}

	.list_img {
		/* box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7); */
		border-radius: 10rpx;
		box-sizing: border-box;
		width: 170rpx;
		height: 170rpx;
		position: relative;
	}

	.xuyuan_item {
		width: 170rpx !important;
		min-width: 170rpx;
		height: 242rpx;
		border-radius: 10rpx;
		margin-right: 20rpx;
		flex-shrink: 0;
		text-align: center;
	}

	.xuyuan_con {
		display: flex;
		margin: 14rpx auto 0;
		width: 630rpx;
		box-sizing: border-box;
		border-bottom: 1px solid #333333;
		overflow-x: scroll;
		overflow-y: hidden;
	}


	.xuyuan_head {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 28rpx;
		padding: 10rpx 24rpx;
		box-sizing: border-box;
		color: #FFFFFF;

	}

	.xuyuan {
		width: 690rpx;
		/* height: 414rpx; */
		/* background: #11141D; */
		background: #0A091A;
		border: 1px solid;
		border-image: linear-gradient(0deg, #666666, #DDDDDD) 10 10;
		border-radius: 10rpx;
		margin: 20rpx auto;
		/* box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7); */
	}


	.content {
		width: 100vw;
		min-height: 100vh;
		padding-top: 1rpx;
		box-sizing: border-box;
	}
</style>
